#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget),work(new Work),thread(new QThread)
{
    ui->setupUi(this);

    work->moveToThread(thread);
    thread->start();
    connect(ui->pushButton,SIGNAL(clicked()),work,SLOT(work_slot()));
}


Widget::~Widget()
{
    delete ui;
}
